package org.ghost.quickstart.scalac.loop

import org.ghost.quickstart.scalac.traits.BaseTrait

object DoWhileLoop extends BaseTrait {
  override def print(): Unit = {
    var sum = 100
    do {
      sum = sum + 1
      if (sum > 120) {
        println("结束循环:" + sum)
        return
      }
    } while (sum > 100)

  }
}
